FIR (finite impulse response) filters are widely used in signal processing systems such as digital signal processors (DSP). FIR filters are generally used to operate on a digital signal to decimate (reduce sampling rates), interpolate (increase sampling rates), and/or remove or filter out unwanted frequencies.
An FIR filter has a number of characteristics and parameters associated with it. An impulse response is actually just the set of FIR filter coefficients. Thus, if an “impulse” which consists of a “1” sample followed by many “0” samples is input into an FIR filter, the output of the filter will be the set of coefficients, as the 1 sample moves past each coefficient in turn to form the output. An FIR “TAP” is simply a coefficient/delay pair. The number of FIR TAPs, (often designated as “N”) is an indication of 1) the amount of memory required to implement the filter, 2) the number of calculations required, and 3) the amount of “filtering” the filter can do. In effect, more TAPs means more stopband attenuation, less ripple, narrower filter transitions, etc. Multiply-Accumulate (MAC), in an FIR filter, is the operation of multiplying a coefficient by the corresponding delayed data sample and accumulating the result. FIR filters usually require one MAC per tap.
FIR filters are commonly implemented with symmetric coefficients to provide a linear phase response. A filter having a linear phase response is a filter that exhibits a constant change in phase angle as a function of frequency. This type of filter response is highly desirable for many applications, such as communications. In these cases, the number of taps is often denoted as 2N or 2N+1. However, only N or N+1 coefficients need to be created due to the symmetry.
One goal of FIR filter design is to increase the number of coefficients and or TAPs. Typical, conventional FIR filters used today employ thousands of coefficients, millions of coefficients or more. These conventional FIR filters compute the large number of coefficients and store them in read only memory (ROM) prior to filter operation. Computing such a large number of coefficients is prohibitively expensive to compute in real-time and is also prohibitively expensive to store. System designers employ many hours of CPU time to search for the coefficients that are best suited for the requirements. However, for applications such as digital domain sample rate conversion, the number of coefficients of the FIR digital filters can reach a level of hundreds, thousands or even millions. For such levels of FIR filters, optimization techniques and/or a huge memory physically storing all the possible coefficients are not feasible. Thus, computing the digital filter coefficients in real-time becomes an indispensable option.
There are a number of conventional approaches to computing coefficients. A first approach is to compute all of the coefficients off-line, as described above, before filtering and store them in read only memory (ROM). Then, the coefficients are recalled from memory during FIR filter operation. However, this approach is not realistic for the large number of coefficients typically used in FIR filters of today because a large amount of storage is required.
A second approach to compute coefficients is to use linear interpolation in real-time. According to this approach, a portion of a large number of coefficients are computed and stored in ROM. During real-time filter operation, coefficients are computed from interpolating between values stored in the ROM. This approach does reduce the size of memory used compared to the first approach (from tens of millions to hundreds of thousands of words), however a large memory is still required and the coefficients calculated from interpolation may not be as accurate as required.
A third approach is to use a multi-stage filter in combination with the second approach. Multiple stages of filters are used instead of a single filter in order to reduce the size of memory used. However, a large amount of memory is still required to store pre-computed coefficients and the coefficients calculated from interpolation may not be as accurate as desired.